﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://wubiyu.cnblogs.com">
<head runat="server">
    <title>Test</title>
    <link href="<%= ResolveClientUrl("~/Content/DomExtGray/gray.css") %>" rel="Stylesheet" type="text/css" />
    <script type="text/javascript" src="<%= ResolveClientUrl("~/hdomextHelper/domExt.min.js") %>"></script>
</head>
<body>
    <h:layout id="layout1" borderwidth="0,0,0,0" minwidth="1024" minheight="500">
        <h:head id="Layout1_head" borderwidth="0,1,0,0" hposition="0,0,*,100" style="background-color: #333333;">
        </h:head>
        <h:bottom id="Layout1_bottom" borderwidth="1,0,0,0" hposition="0,0,*,*">
            <h:layout id="layout2" borderwidth="0,0,0,0">
                <h:head id="layout2_head" borderwidth="0,0,0,0" style="background-color: #f8f8f8;">
                    <h:layout id="layout3" borderwidth="0,0,0,0">
                        <h:left id="layout3_left" borderwidth="0,0,0,0" hposition="0,0,200,*">
                            <h:layout id="layout4" borderwidth="0,0,0,0">
                                <h:head id="layout4_head" style="background-color: #f8f8f8;" borderwidth="0,0,0,0"
                                    hposition="0,0,*,200">
                                </h:head>
                                <h:hsplitter id="layout4_hsplitter" borderwidth="1,0,1,0" hposition="0,0,*,5">
                                </h:hsplitter>
                                <h:bottom id="layout4_bottom" style="background-color: #f8f8f8;" borderwidth="0,0,0,0">
                                    <h:layout>
                                        <h:head style="overflow: auto;">
                                            <div id="msg">
                                            </div>
                                            <div id="bug">
                                            </div>
                                        </h:head>
                                        <h:hsplitter>
                                        </h:hsplitter>
                                        <h:bottom hposition="0,0,*,200">
                                        </h:bottom>
                                    </h:layout>
                                </h:bottom>
                            </h:layout>
                        </h:left>
                        <h:vsplitter id="layout3_vsplitter" borderwidth="0,1,0,1" hposition="0,0,5,*">
                        </h:vsplitter>
                        <h:right id="layout3_right" borderwidth="0,0,0,0" style="background-color: #f8f8f8;">
                            <h:layout id="layout5" borderwidth="0,0,0,0">
                                <h:left id="layout5_left" borderwidth="0,0,0,0" hposition="0,0,*,*">
                                    <h:layout id="layout6" borderwidth="0,0,0,0">
                                        <h:left>
                                            <h:listview id="listview" istab="true">
                                                <h:itemtemplet>
                                                    {=[1]}
                                                 </h:itemtemplet>
                                            </h:listview>
                                            <br />
                                            <h:pagesplitter id="pSplitter" showsize="2">
                                            </h:pagesplitter>
                                            <br />
                                            <h:btn onclick="OK();" isactive="true">确定
                                            </h:btn>
                                            <h:btn onclick="esc();">取消
                                            </h:btn>
                                            <h:btn onclide="createUser();">新建用户
                                            </h:btn>
                                            <h:text id="" text="ssss" onfocus="alert(this.id);" maxchar="5">
                                            </h:text>
                                            <h:text>
                                            </h:text>
                                            <h:editdroplist id="testEditdroplist3" itemtemplet=" &nbsp;{=[1]}" textdatatemplet="{=[1]}"
                                                textisreadonly="true">
                                            </h:editdroplist>
                                            <h:btn onclide="createUser();">新建用户
                                            </h:btn>
                                            <h:editdroplist id="testEditdroplist2" textdatatemplet="{=[1]}">
                                                <h:itemtemplet>
                                                    <div style="height: 25px;">
                                                        &nbsp;{=[0]}
                                                    </div>
                                                </h:itemtemplet>
                                            </h:editdroplist>
                                            <br />
                                            <br />
                                            <h:treeview id="textTree" value="id:{=[0]},name:{=[1]}" onitemclick="treeview_onclick">
                                            </h:treeview>
                                            <br />
                                            <br />
                                        </h:left>
                                        <h:vsplitter>
                                        </h:vsplitter>
                                        <h:right hposition="0,0,200,*">
                                            <iframe src="http://www.baidu.com" width="100%" height="100%"></iframe>
                                        </h:right>
                                    </h:layout>
                                </h:left>
                                <h:vsplitter id="layout5_vsplitter" borderwidth="0,1,0,1" hposition="0,0,5,*">
                                </h:vsplitter>
                                <h:right id="layout5_right" borderwidth="0,0,0,0" hposition="0,0,200,*" style="background-color: #f8f8f8;">
                                    <h:listview id="listview2">
                                        <h:itemtemplet>
                                             {=[1]}
                                        </h:itemtemplet>
                                    </h:listview>
                                </h:right>
                            </h:layout>
                        </h:right>
                    </h:layout>
                </h:head>
                <h:bottom id="layout2_bottom" borderwidth="1,0,0,0" hposition="0,0,*,30" style="background-color: #333333;">
                    <div style="margin-top: 2px;">
                        <h:btn onclick="set();">设置ddin</h:btn>
                        <h:btn onclick="sssss();">设置inds</h:btn>
                        <h:btn onclick="getsb();">设置</h:btn>
                        <h:btn onclick="testTab();">获取鼠标</h:btn>
                        <h:btn onclick="OK();">确定</h:btn>
                        <h:btn onclick="esc();">取消</h:btn>
                        <h:btn onclide="createUser();" isactive='true'>新建用户</h:btn>
                        <h:text id="sssss" text="ddddd" maxchar="5">
                        </h:text>
                        <h:text>
                        </h:text>
                        <h:btn onclide="createUser();">新建用户</h:btn>
                    </div>
                </h:bottom>
            </h:layout>
        </h:bottom>
    </h:layout>
    <h:window id="testwindow01" style="display: none;" isshowmask="true">
        <h:caption>
            &nbsp;用户注册
        </h:caption>
        <h:content>
             注册内容
        </h:content>
    </h:window>
    <h:windows>
    </h:windows>
    <script type="text/javascript">
        _h.ready(function (d, h, g) {
            //_h.btn.Active(_g("#button"), "false");
            //alert(_g("#button").isactive);
            //window.setInterval("fun()", 100);
            //window.setInterval("getsb()", 1);
            //_h.layout.DoLayout(_g("#layout3"));

            var data = [[1, "用户管理instr"], [2, "新建用户2222"], [3, "修改用户222"], [4, "角色管理"], [5, "新建角色"], [6, "删除角色"], [7, "添加权限"], [8, "部门管理"], [8, "新建部门"],
            [8, "修改部门"], [8, "编辑部门"], [8, "调整结构"], [8, "高级查询"], [8, "导出报表"], [8, "自定义"]];
            var listview = _g("#listview");
            listview.Data = data;
            listview.OnItemClick = function (lv, sender, i) {
                // alert(i);

            }

            _h.PageSplitter.BindData(_g("#pSplitter"));
            _h.ListView.Bind(listview);
            var listview2 = _g("#listview2");
            listview2.Data = data;
            _h.ListView.Bind(listview2);
            _h.ajax({ async: true, url: _h.ResolveClientUrl('~/Home/TestAjax'), data: "", success: function (msg) {
                //alert(msg);
            }
            });
            var testEditdroplist2 = _g("#testEditdroplist2");
            var testEditdroplist3 = _g("#testEditdroplist3");
            _h.EditDropList.SetData(testEditdroplist2, data);
            _h.EditDropList.SetData(testEditdroplist3, data);

            var treeviewData = [[1, "用户管理(User Manage)", -1, "|1|"], [2, "组管理(category Manage)", -1, "|2|"], [3, "计算机管理(computer Manage)", -1, "|3|"],
                                            [4, "添加用户", 1, "|1|4|"], [5, "编辑用户", 1, "|1|5|"], [6, "删除用户", 1, "|1|6|"], [7, "添加组", 2, "|2|7|"], [8, "编辑组", 2, "|2|8|"], [9, "删除组", 2, "|2|9|"],
                                            [10, "添加计算机", 3, "|3|10|"], [11, "编辑计算机", 3, "|3|11|"], [12, "删除计算机", 3, "|3|12|"], [13, "添加test", 4, "|1|4|13|"], [14, "添加test", 13, "|1|4|13|14|"]];
            var textTree = _g("#textTree");
            textTree.Data = treeviewData;
            textTree.OnExpandHandle = function (pid, completefn, listview) {
                _h.ajax({ async: false, url: _h.ResolveClientUrl('~/Home/TestLoad'), data: "", success: function (msg) {
                    completefn();
                }
                });

                return _h.TreeView.GetItemDatas(textTree, pid);
            };
            _h.TreeView.Expand(textTree);
            //_h.Window.Show(_g("#testwindow01"));
            //_h.Window.Hid(_g("#testwindow01"));
            // alert(_h.TreeView.GetLayerNum("|1|"));
            //_h.PageWindows.wmask.ShowOpacityMask0();
            //_g("#testwindow01").style.display = "";
            var testwindow2 = _h.Windows.CreateWindow("test2Window", "测试窗口", "内容", "0,0,400,300", "m");
            debugger;
            _h.Window.Show(testwindow2);
        });


        function treeview_onclick(value) {
            alert(value);
        }
        function getsb() {

        }
        function listview_ItemClick(sender, i) {

        }
        function set() {

        }

        function testTab() {

        }
        function OK() {
            var testEditdroplist2 = _g("#testEditdroplist2");
            alert(_h.EditDropList.GetValue(testEditdroplist2));
            alert(_h.EditDropList.GetsSelect(testEditdroplist2)[1]);
            var testEditdroplist3 = _g("#testEditdroplist3");
            _h.EditDropList.SetValue(testEditdroplist3, _h.EditDropList.GetsSelect(testEditdroplist2)[1]);
        }
        function esc() {
            var data = [[1, "用户管理instr"], [2, "新建用户2222"], [3, "修改用户222"], [4, "角色管理"], [5, "新建角色"], [6, "删除角色"], [7, "添加权限"], [8, "部门管理"], [8, "新建部门"],
            [8, "修改部门"], [8, "编辑部门"], [8, "调整结构"], [8, "高级查询"], [8, "导出报表"], [8, "自定义"]];

            //_h.EditDropList.BindData(testEditdroplist2);

        }
        //var FPCDrop = new _hy.EditDropDownList({
        //    Id: "FPCDrop",
        //    Panel: "yearDropDown",
        //    Value:"",
        //    Width:60,
        //    Height: 20,
        //    TextIsReadonly:true,
        //    DropBoxItemTemplet:"#=[1]#",
        //    Css:"EditDropDownList",
        //    DropDownBtnCss:"dropbtn",
        //    DropDownBtnMoveCss:"dropbtn_move",
        //    DropBoxCss:"DropBoxCss",
        //    DropBoxItemHeight:25,
        //    DropBoxItemCssRows:"ListViewCssRows",
        //    DropBoxItemCssRowsMove:"ListViewCssRowsMove",
        //    DropBoxItemCssSelected: "ListViewCssSelected"
        //});

    </script>
</body>
</html>
